@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />

@endsection

@section('html-body')
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="">置顶服务</a>
        </div>

        <!--二级目录-->
        @include('admin.common.top-header')

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>职位id</th>
                    <th>置顶时间</th>
                    <th>积分或现金使用数量</th>
                    <th>置顶开始时间</th>
                    <th>置顶结束时间</th>
                    <th>付款方式</th>
                    <th>订单号</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                @if(count($topRecords)>0)
                @foreach($topRecords as $topRecord)
                    <tr id="banner_{{$topRecord->id}}">
                        <td>{{$topRecord->id}}</td>
                        <td>{{$topRecord->position_id}}</td>
                        <td>{{$topRecord->hours}}</td>
                        <td>{{$topRecord->num}}</td>
                        <td>{{$topRecord->start_time}}</td>
                        <td>{{$topRecord->end_time}}</td>
                        <td>{{$topRecord->type}}</td>
                        <td>{{$topRecord->order_num}}</td>
                        <td>
                            @if($topRecord->status == 0)
                                <p style="color:red;;">过期</p>
                            @else
                                <p style="color:green;">置顶中</p>
                            @endif
                        </td>
                    </tr>
                @endforeach
                @endif
                </tbody>
            </table>
        </div>
        <div class="pagelist" style="text-align: center;">
            <?php echo $topRecords->render(); ?>
        </div>
    </div>
@endsection